package com.liu.test.param;

import java.util.Arrays;

/**
 * Created by shi860715@126.com
 * Date 2021/7/9 10:13
 * 方法的传参的机制
 */
public class Exap4 {

    public static void main(String[] args) {

        int i =1;
        String str = "hello";
        Integer num = 200;
        int [] arr = {1,2,3,4,5};
        Mydata  my = new Mydata();

        change(i,str,num,arr,my);
        System.out.println(i);
        System.out.println(str);
        System.out.println(num);
        System.out.println(Arrays.toString(arr));
        System.out.println(my.a);
    }

    public static void change(int j ,String  s ,Integer n ,int[] a ,Mydata m){
        j +=1;
        s+="word";
        n+=1;
        a[0]+=1;
        m.a+=1;
    }









}
class  Mydata{
    int a =10;
}